<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/zeitgeist_administrator.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Zeitgeist Administrator - Edit user</title>
<!-- InstanceEndEditable -->

<link rel="stylesheet" href="@@{templatepath}@@/css/main.css" type="text/css" />

<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery-1.3.2.min.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery-ui-1.7.2.custom.min.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tooltip.min.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tablesorter.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tablesorter.filter.js"></script>
<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/jquery.tablesorter.pager.js"></script>

<script language="JavaScript" type="text/javascript" src="@@{templatepath}@@/js/chili-1.7.pack.js"></script>

<script language="JavaScript" type="text/javascript">

	$(function() {
		$('#set1 *').tooltip();

		$("#block").click($.tooltip.block);
	});
	
</script>

<!-- InstanceBeginEditable name="head" -->

<script language="JavaScript" type="text/javascript">

	function showOverview()
	{
		window.location.href = "@@{[users.index]}@@";
	}

	$(document).ready(function() 
		{ 
	
			$("#userrightstable")
			.tablesorter({widthFixed: true, widgets: ['zebra']}) 
			.tablesorterFilter({filterContainer: "#filter-box",
								filterClearContainer: "#filter-clear-button",
								filterColumns: [0, 1]});

			$("#userrolestable")
			.tablesorter({widthFixed: true, widgets: ['zebra']}) 
			.tablesorterFilter({filterContainer: "#filter-box",
								filterClearContainer: "#filter-clear-button",
								filterColumns: [0, 1]});
	
			; 

			$("#useraccordion").accordion({ autoHeight: false, clearStyle: true});
		} 
	); 

</script>

<!-- InstanceEndEditable -->
</head>

<body>

	<!-- navigation starts here -->
	<div id="nav">
		
		<h3>Zeitgeist Administrator v2 - <a href="@@{[projects.index]}@@" id="projectlink">@@{activeproject}@@</a></h3>
	
	</div>

	<!-- header starts here -->
	<!-- TemplateBeginBlock name="mainmenu" -->
	<div id="header">	
	
        	<div id="topnavleft">
                <a href="@@{[main.index]}@@"><img src="@@{templatepath}@@/images/icons/home_128.png" id="naviconleft" alt="Home" title="Home" border="0"/></a>
                <a href="@@{[setup.index]}@@"><img src="@@{templatepath}@@/images/icons/setup_128.png" id="naviconleft" alt="Setup application" title="Setup application" border="0" /></a>
                <a href="@@{[users.index]}@@"><img src="@@{templatepath}@@/images/icons/user_128.png" id="naviconleft" alt="Manage users" title="Manage users" border="0" /></a>
                <a href="@@{[projects.index]}@@"><img src="@@{templatepath}@@/images/icons/projects_128.png" id="naviconleft" alt="Manage Zeitgeist Administrator projects" title="Manage Zeitgeist projects" border="0" /></a>
            </div>

        	<div id="topnavright">
                <a href="@@{[main.info]}@@"><img src="@@{templatepath}@@/images/icons/info_128.png" id="naviconright" alt="Info" border="0" /></a>
                <a href="@@{[main.logout]}@@"><img src="@@{templatepath}@@/images/icons/exit_128.png" id="naviconright" alt="Logout" title="Logout" border="0" /></a>
			</div>
            <div style="clear:both;"></div>

	</div>	
	<!-- TemplateEndBlock -->

	<!-- TemplateBeginBlock name="usermessages" -->
		<h3 class="usermessage"><img src="@@{templatepath}@@/images/icons/ok_32.png" alt="" align="left" style="margin-right:5px;" /> @@{usermessage}@@</h3>
	<!-- TemplateEndBlock -->

	<!-- TemplateBeginBlock name="userwarnings" -->
		<h3 class="userwarning"><img src="@@{templatepath}@@/images/icons/warning_32.png" alt="" align="left" style="margin-right:5px;" /> @@{userwarning}@@</h3>
	<!-- TemplateEndBlock -->

	<!-- TemplateBeginBlock name="usererrors" -->
		<h3 class="usererror"><img src="@@{templatepath}@@/images/icons/error_32.png" alt="" align="left" style="margin-right:5px;" /> @@{usererror}@@</h3>
	<!-- TemplateEndBlock -->	
				
	<!-- content-wrap starts here -->
	<div id="content-wrap">
    <div id="content">	 

		<div id="sidebar" >	
        <!-- InstanceBeginEditable name="sidebar" -->

			<h3>Quickhelp</h3>
			<p>Here you can edit the userdata for a existing user or reset his password. Click on the headlines to open the respective user information.</p>
            <p>The <span id="projectlink">username</span> and <span id="projectlink">user key</span> should only be changed if necessary. There are NO checks if the username or key are unique, so handle with care.</p>
			<p>A <span id="projectlink">userrole</span> consists of a number of actions. A user with the role will autmatically have all userrights associated with the role.</p>
            <p>Apart from roles you can set the <span id="projectlink">userrights</span> for actions manually. They will be available additionally to the roles a user has.</p>

		<!-- InstanceEndEditable -->
		</div>	
	
		<div id="main">		
        <!-- InstanceBeginEditable name="main" -->

			<form method="post" action="@@{[users.edituser]}@@" name="userform" enctype="multipart/form-data; charset=utf-8">
			<input type="hidden" value="@@{user_id}@@" name="user_id" />

			<div id="useraccordion">
			<h2><a href="#">Edit user</a></h2>
            <div>
			<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td align="right" nowrap="nowrap" valign="top"><p class="formlabel">Username*</p></td>
				<td valign="middle">
				<!-- TemplateBeginBlock name="user_username:errorblock" -->
					<br /><span class="formerrormsg">@@{user_username:errormessage}@@</span><br />
				<!-- TemplateEndBlock -->
                <input type="text" maxlength="60" name="edituser[user_username]" value="@@{user_username:value}@@" class="formtext" />
				</td>
			</tr>
			<tr>
				<td align="right" nowrap="nowrap" valign="top"><p class="formlabel">User key*</p></td>
				<td align="left" valign="middle">
					<!-- TemplateBeginBlock name="user_key:errorblock" -->
						<br /><span class="formerrormsg">@@{user_key:errormessage}@@</span><br />
					<!-- TemplateEndBlock -->				
					<input type="text" maxlength="60" name="edituser[user_key]" value="@@{user_key:value}@@" class="formtext" />
				</td>
			</tr>
			</table>

			<h3>Change Password</h3>
            <p>Enter a new passwort to change to current one.</p>
			<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td align="right" nowrap="nowrap" valign="top"><p class="formlabel">Password</p></td>
				<td valign="middle">
				<!-- TemplateBeginBlock name="user_password:errorblock" -->
					<br /><span class="formerrormsg">@@{user_password:errormessage}@@</span><br />
				<!-- TemplateEndBlock -->
                <input type="text" maxlength="60" name="edituser[user_password]" value="@@{user_password:value}@@" class="formtext" />
				</td>
			</tr>
			<tr>
				<td align="right" nowrap="nowrap" valign="top"><p class="formlabel">Confirmation</p></td>
				<td align="left" valign="middle">
					<!-- TemplateBeginBlock name="user_pwconfirmation:errorblock" -->
						<br /><span class="formerrormsg">@@{user_pwconfirmation:errormessage}@@</span><br />
					<!-- TemplateEndBlock -->				
					<input type="text" maxlength="60" name="edituser[user_pwconfirmation]" value="@@{user_pwconfirmation:value}@@" class="formtext" />
				</td>
			</tr>
			</table>
            </div>

			<h2><a href="#">Userdata</a></h2>
            <div>
            <table id="userdatatable" border="0" cellpadding="0" cellspacing="5" width="100%">
	       	<thead>
	        <tr>
				<th><p>Key</p></th>
				<th><p>Value</p></th>
	        </tr>
            </thead>
            <tbody>
			<!-- TemplateBeginBlock name="userdatafield" -->
                <tr>
                    <td id="listtable"><p>@@{userdatafield_key}@@</a></p></td>
                    <td id="listtable"><p>
                    <input type="text" maxlength="255" name="userdata[@@{userdatafield_key}@@]" value="@@{userdatafield_value}@@" class="formtext" />
                    </p></td>
                </tr>
			<!-- TemplateEndBlock -->
			</table>
            </div>

			<h2><a href="#">Userroles</a></h2>
            <div>
            <table id="userrolestable" border="0" cellpadding="0" cellspacing="5" width="100%">
	       	<thead>
	        <tr>
				<th><p>Userrole</p></th>
				<th><p>Description</p></th>
				<th><p>Has Userrole</p></th>
	        </tr>
            </thead>
            <tbody>
			<!-- TemplateBeginBlock name="userroles" -->
                <tr>
				<td id="listtable"><p>@@{userrole_name}@@</a></p></td>
				<td id="listtable"><p>@@{userrole_description}@@</a></p></td>
				<td id="listtable"><p><input type="checkbox" name="userroles[@@{userrole_id}@@]" @@{userrole_active}@@ /></p></td>
			<!-- TemplateEndBlock -->				
			</tr>
			</table>
            </div>

			<h2><a href="#">Userrights</a></h2>
            <div>
            <table id="userrightstable" border="0" cellpadding="0" cellspacing="5" width="100%">
	       	<thead>
	        <tr>
				<th><p>Module</p></th>
				<th><p>Action Name</p></th>
				<th><p>Has Userright</p></th>
	        </tr>
            </thead>
            <tbody>
			<!-- TemplateBeginBlock name="userrights" -->
                <tr>
				<td id="listtable"><p>@@{module_name}@@</a></p></td>
				<td id="listtable"><p>@@{action_name}@@</a></p></td>
				<td id="listtable"><p><input type="checkbox" name="userrights[@@{action_id}@@]" @@{action_active}@@ /></p></td>
			<!-- TemplateEndBlock -->				
			</tr>
			</table>
            </p>
            </div>

            </div>

			<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td colspan="2">
				   <p style="text-align:center;">
				   <input name="back" value="Back to overview" class="formbutton" type="button" onclick="javascript:showOverview();" />
				   <input name="submit" value="Submit data" class="formbutton" type="submit" />
				   </p>
				</td>
			</tr>
			</table>

			</form>

		<!-- InstanceEndEditable -->
		</div>					
		
	<!-- content-wrap ends here -->		
	</div>
    </div>

	<!-- footer starts here-->	
	<div id="footer-wrap">
		
		<div id="footer-bottom">		
			<p>
			&copy; 2009 <strong><a href="http://www.menschenwerk.net">Menschenwerk.net</a></strong> | 
			Original template design: <a href="http://www.styleshout.com/">styleshout</a> | 
            Icons by: <a href="http://www.icon-king.com/projects/nuvola/">David Vignoni</a>
			</p>		
		</div>	
	
	<!-- footer ends-->		
	</div>

</body>
<!-- InstanceEnd --></html>
